package stkr;

import java.awt.BorderLayout;
import java.awt.Color;

import javax.swing.JFrame;
import javax.swing.JLabel;

public class StkrDisplay {

	public void doDisplay(Stkr stockTicker) throws InterruptedException{
		
		// Create the GUI
		StkrWindow frame = new StkrWindow();

		
		while (frame.isShowing()) {
			
			for(Stock stock: stockTicker.getTickerStocks()){
				frame.setLabel(stock.getExchangeName() + ":" + stock.getCompanyName() + "  -  " + stock.getCurrencyCode() + "   " + stock.getCurrentPrice() );
				Thread.sleep(StkrConstants.tickerUpdateInterval * 1000);
			}
			
		}
	}
	
}
